<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>用户中心</title>
    <link rel="apple-touch-icon" href="../static/assets/images/favicon.png" type="image/x-icon">
    <link rel="icon" href="../static/assets/images/favicon.png" type="image/x-icon">
    <link rel="stylesheet" href="../static/assets/css/font-awesome.min.css">
    <link rel="stylesheet" href="../static/assets/css/animation.css">
    <link rel="stylesheet" href="../static/assets/css/base.css">
    <link rel="stylesheet" href="../static/assets/css/website-page.css">
    <link rel="stylesheet" href="../static/assets/css/admin-page.css">
    <link href="../static/components/sweetalert2/sweetalert2.css" rel="stylesheet"></link>
</head>
<body>
    <div class="wrapper admin-body"><!-- 注意：点击右侧导航收缩按钮时wrapper加类名mini-navbar搜索栏 -->
        <header id="header" class="header pr" role="banner">
             <nav class="header-navbar" role="navigation"><!-- 滚动条往下滚动页面的时候头部固定效果 加类名fixed-top-->
                <div class="navbar-top">
                     <div class="container clearfix">
                        <div class="navbar-left fl">
                           <div>欢迎来到BTSO3.0主题网站 <span class="ml20"><i class="fa fa-phone mr5"></i>技术服务热线：400-820-7719</span><span class="head_phonetxt"><span class="top_text ml50">当前所在企业：上海市电力公司-国家电网  </span><!-- <span class="top_text ml20">联系电话：138166999999</span> --></span></div>
                        </div>
                        <div class="navbar-right fr">
                          <span class="navbar-login none">
                            <a href="login.html"><i class="fa fa-user mr5"></i>登录</a>
                            <a href="phone-register.html"><i class="fas fa-sign-in mr5 ml20"></i>注册</a>
                          </span>
                          <!-- 登录后状态 去掉none即可-->
                          <span class="navbar-user "><a href="../用户中心/admin-index.html"><i class="fa fa-user mr10"></i>张三，注册会员，下午好</a><a href="javascript:;" class="loginuser-exit">退出</a></span>
                        </div>
                     </div>
                </div>
                <div class="sticky-wrapper nav-bgcol">
                   <div class="container">
                      <div class="navbar-header clearfix pr">
                         <button type="button" id="navbar-phone" class="navbar-toggle navbar-btn btn-icon btn-circle pull-right collapsed">
                            <span class="fa fa-reorder"></span>
                         </button>
                         <a class="navbar-brand" href="index.html"><img src="../static/assets/images/logo.png" alt=""></a>
                         <button type="button" class="navbar-btn btn-icon btn-circle pull-right last visible-sm visible-xs"><i class="fa fa-search"></i></button>
                         <button type="button" class="navbar-btn btn-icon btn-circle pull-right visible-sm visible-xs"><i class="fa fa-shopping-cart"></i></button>
                         <button type="button" class="navbar-btn btn-icon btn-circle pull-right visible-sm visible-xs"><i class="fa fa-pencil-square-o"></i></button>
                         <button type="button" class="navbar-btn btn-icon btn-circle pull-right last visible-sm visible-xs"><i class="fa fa-bell"></i></button>
                         <ul class="navbar-navphone none"> <!-- navbar-phone该层点击的时候toggle none -->
                           <li><a href="../index.html">首页</a></li>
                           <li class="pr">
                            <a href="#">产品中心</a>
                            <ul class="">
                              <li>
                                <a class="dropdown-item" href="static-index.html">北塔BTSO 智慧运维平台</a>
                              </li>
                              <li>
                                <a class="dropdown-item" href="industry-case.html">北塔BTDO 业务保障系统</a>
                              </li>
                              <li>
                                <a class="dropdown-item" href="data-download.html">北塔BTSM IT服务管理系统</a>
                              </li>
                              <li>
                                <a class="dropdown-item" href="#">北塔BTIM IT综合管理软件</a>
                              </li>
                              <li>
                                <a class="dropdown-item" href="trial-apply.html">北塔BTRM IT资源管理系统</a>
                              </li>
                              <li>
                                <a class="dropdown-item" href="version-contrast.html">北塔BTDM 数据流分析系统</a>
                              </li>
                              <li>
                                <a class="dropdown-item" href="version-upgrade.html">EMonitor 监控管家</a>
                              </li>
                              <li>
                                <a class="dropdown-item" href="version-upgrade.html">北塔BTCM IT运维集中管理软件</a>
                              </li>
                              <li>
                                <a class="dropdown-item" href="version-upgrade.html">北塔BTNM 网络运维管理系统</a>
                              </li>
                              <li>
                                <a class="dropdown-item" href="version-upgrade.html">北塔BTDP</a>
                              </li>
                            </ul>
                          </li>
                          <li>
                            <a href="#" class="dropdown-toggle">解决方案</a>
                          </li>
                          <li>
                            <a href="#" class="dropdown-toggle">注册管理</a>
                          </li>
                          <li>
                            <a href="#" class="dropdown-toggle">互动社区</a>
                          </li>
                          <li>
                            <a href="#" class="dropdown-toggle">技术支持</a>
                          </li>
                          <li>
                            <a href="account-manage.html" class="dropdown-toggle">企业账户</a>
                          </li>
                        </ul>
                      </div>
                      <div class="collapse navbar-collapse" id="main-navbar-container">
                        <ul class="nav navbar-nav pr hidden-md">
                          <li>
                            <a href="../index.html" class="dropdown-toggle">首页<em>/</em></a>
                          </li>
                          <li class="dropdown">
                            <a href="../产品中心/product-center.html" class="dropdown-toggle">产品中心<em>/</em></a>
                            <div class="nav-menu-area clearfix">
                              <ul class="single-mega-item">
                                <li class="block">IT监控</li>
                                <li><a href="../产品中心/common-problem.html">BTSO北塔智慧运维平台软件</a></li>
                                <li><a href="#">BTVD北塔视频质量诊断软件</a></li>
                              </ul>
                              <ul class="single-mega-item">
                                <li class="block">IT管理</li>
                                <li><a href="#">BTSM北塔服务管理软件</a></li>
                                <li><a href="#">BTAM北塔IT资产管理系统</a></li>
                                <li><a href="#">BTRM北塔IT资源管理系统</a></li>
                                <li><a href="#">Portal北塔运维门户组件</a></li>
                              </ul>
                            </div>
                          </li>
                          <li>
                            <a href="#" class="dropdown-toggle">解决方案<em>/</em></a>
                          </li>
                          <li>
                            <a href="#" class="dropdown-toggle">注册管理<em>/</em></a>
                          </li>
                          <li>
                            <a href="#" class="dropdown-toggle">互动社区<em>/</em></a>
                          </li>
                          <li>
                            <a href="../云端百货/vip-list.html" class="dropdown-toggle">云端百货<em>/</em></a>
                          </li>
                          <li>
                            <a href="#" class="dropdown-toggle">技术支持<em>/</em></a>
                          </li>
                          <li class="active">
                            <a href="admin-index.html" class="dropdown-toggle">企业账户</a>
                          </li>
                        </ul>
                        <div class="dropdown cart-dropdown navbar-right hidden-sm hidden-xs">
                          <button type="button" title="消息" class="navbar-btn btn-icon btn-circle dropdown-toggle" data-toggle="dropdown"><i class="fa fa-bell"></i><span class="circle-red">2</span></button>
                        </div>
                        <!-- <div class="dropdown cart-dropdown navbar-right hidden-sm hidden-xs">
                          <button type="button" title="购物车" class="navbar-btn btn-icon btn-circle dropdown-toggle" data-toggle="dropdown"><i class="fa fa-shopping-cart"></i></button>
                        </div> -->
                        <div class="dropdown cart-dropdown navbar-right hidden-sm hidden-xs">
                          <button type="button" title="反馈" class="navbar-btn btn-icon btn-circle navbar-right last" data-toggle="collapse" data-target="#header-search-form"><i class="fa fa-pencil-square-o"></i></button>
                        </div>
                        <div class="dropdown hidden-sm hidden-xs btn-search pr"><!-- 点击搜索按钮加类名active -->
                          <button type="button" title="搜索" class="navbar-btn btn-icon btn-circle navbar-right last" data-toggle="collapse" data-target="#header-search-form"><i class="fa fa-search"></i></button>
                          <div class="search-box">
                            <input type="text" class="search-input">
                            <i class="fa fa-arrow-circle-o-right"></i>
                          </div>
                        </div>
                      </div>
                   </div>
                </div> 
             </nav>
        </header>
        <section class="section gray-section">
            <div class="container clearfix">
                <nav class="navbar-static-side" role="navigation">
                    <div class="sidebar-collapse">
                        <ul class="nav metismenu" id="side-menu">
                            <li class="nav-header">
                                <div class="dropdown profile-element">
                                    <img alt="image" class="rounded-circle" src="../static/assets/images/profile_small.jpg"/>
                                    <div class="nav-right-user">
                                        <a href="admin-index.html">企业账户</a>
                                    </div>
                                </div>
                            </li>
                            <li>
                              <ul class="nav nav-second-level mt20"><!-- 默认隐藏时去掉in -->
                                <li class="active"><a href="account-manage.html">账号管理</a></li>
                                <li><a href="renewal-authorization.html">续期授权</a></li>
                                <li><a href="company-points.html">企业积分</a></li>
                                <li><a href="vip-manage.html">VIP管理</a></li>
                              </ul>
                            </li>
                        </ul>
                    </div>
                </nav>
                <div class="page-wrapper">
                    <div class="border-bottom page-heading">
                        <div class="page-headbox">
                            <ol class="breadcrumb">
                                <li class="breadcrumb-item">
                                    <a href="admin-index.html">首页</a>
                                </li>
                                <li class="breadcrumb-item active">
                                    <strong>账号管理</strong>
                                </li>
                            </ol>
                        </div>
                    </div>
                    <div class="wrapper-content">
                        <div class="page-ibox-title clearfix">
                            <span class="mt7">账号管理</span>
                        </div>
                        <div class="page-ibox">
                            <div class="ibox-content">
                                <div class="admin-tablebox">
                                    <div class="tablebox-head clearfix">
                                        <div class="fl account-change-btn">
                                            <a href="javascript:;" class="btn btn-blue" data-toggle="modal" data-target="#generalModal"><i class="fa fa-plus-circle"></i>新增</a>
                                            <a href="javascript:;" class="btn btn-green pr J_allEnable none"><i class="fa fa-check-circle"></i>批量启用</a>
                                            <a href="javascript:;" class="btn btn-gray pr J_allForbidden"><i class="fa fa-ban"></i>批量禁用</a>
                                        </div>
                                        <div class="tablebox-search">
                                            <input type="text" class="form-control input-tabsearch" placeholder="账号、真实姓名、部门、职务">
                                            <i class="fa fa-search"></i>
                                        </div>
                                        <div class="tablebox-search">
                                            <select class="form-control list-change-status">
                                                <!-- <option>账号状态</option> -->
                                                <option value="2">全部</option>
                                                <option value="1">正常</option>
                                                <option value="0">禁用</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="tablebox-cnt">
                                        <table class="table J_table_data">
                                            <thead>
                                                <tr>
                                                    <!-- 注：如有排序功能加head类名, 升序为sorting-asc类名，降序加sorting-desc类名 -->
                                                    <th class="w20"><input type="checkbox" class="J_allInput"></th>
                                                    <th class="head sorting-asc"><i class="fa fa-sort"></i><i class="fa fa-sort-up"></i><i class="fa fa-sort-down"></i>序号</th>
                                                    <th class="head sorting-desc"><i class="fa fa-sort"></i><i class="fa fa-sort-up"></i><i class="fa fa-sort-down"></i>账号</th>
                                                    <th class="head w70"><i class="fa fa-sort"></i><i class="fa fa-sort-up"></i><i class="fa fa-sort-down"></i>真实姓名</th>
                                                    <th class="head w80"><i class="fa fa-sort"></i><i class="fa fa-sort-up"></i><i class="fa fa-sort-down"></i>手机号</th>
                                                    <th class="head"><i class="fa fa-sort"></i><i class="fa fa-sort-up"></i><i class="fa fa-sort-down"></i>部门</th>
                                                    <th class="head"><i class="fa fa-sort"></i><i class="fa fa-sort-up"></i><i class="fa fa-sort-down"></i>职务</th>
                                                    <th class="head"><i class="fa fa-sort"></i><i class="fa fa-sort-up"></i><i class="fa fa-sort-down"></i>角色</th>
                                                    <th class="head"><i class="fa fa-sort"></i><i class="fa fa-sort-up"></i><i class="fa fa-sort-down"></i>创建时间</th>
                                                    <th class="head w50"><i class="fa fa-sort"></i><i class="fa fa-sort-up"></i><i class="fa fa-sort-down"></i>状态</th>
                                                    <th>操作</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <tr>
                                                    <td class="w20"><input type="checkbox" class="J_singleInput"></td>
                                                    <td>001</td>
                                                    <td>zhangsna</td>
                                                    <td>张三丰</td>
                                                    <td>13568599258</td>
                                                    <td>人事部</td>
                                                    <td>技术经理</td>
                                                    <td>管理员账号</td>
                                                    <td>2016/9/20 0:00:01</td>
                                                    <td class="change-btn"><span class="danger-color">禁用</span></td>
                                                    <td>
                                                        <div class="table-btn">
                                                            <a href="javascript:;" class="btn btn-edit" data-toggle="modal" data-target="#generalModal">编辑</a>
                                                            <a href="javascript:;" class="btn btn-edit btn-state" data-state="1">启用</a>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td><input type="checkbox" class="J_singleInput"></td>
                                                    <td>002</td>
                                                    <td>zhangsna</td>
                                                    <td>张三丰</td>
                                                    <td>13568599258</td>
                                                    <td>人事部</td>
                                                    <td>技术经理</td>
                                                    <td>管理员账号</td>
                                                    <td>2016/9/20 0:00:01</td>
                                                    <td class="change-btn"><span class="success-color">正常</span></td>
                                                    <td>
                                                        <div class="table-btn">
                                                            <a href="javascript:;" class="btn btn-edit" data-toggle="modal" data-target="#generalModal">编辑</a>
                                                            <a href="javascript:;" class="btn btn-enables btn-state" data-state="0">禁用</a>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td><input type="checkbox" class="J_singleInput"></td>
                                                    <td>003</td>
                                                    <td>zhangsna</td>
                                                    <td>张三丰</td>
                                                    <td>13568599258</td>
                                                    <td>人事部</td>
                                                    <td>技术经理</td>
                                                    <td>管理员账号</td>
                                                    <td>2016/9/20 0:00:01</td>
                                                    <td class="change-btn"><span class="success-color">正常</span></td>
                                                    <td>
                                                        <div class="table-btn">
                                                            <a href="javascript:;" class="btn btn-edit" data-toggle="modal" data-target="#generalModal">编辑</a>
                                                            <a href="javascript:;" class="btn btn-enables btn-state" data-state="0">禁用</a>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td><input type="checkbox" class="J_singleInput"></td>
                                                    <td>004</td>
                                                    <td>zhangsna</td>
                                                    <td>张三丰</td>
                                                    <td>13568599258</td>
                                                    <td>人事部</td>
                                                    <td>技术经理</td>
                                                    <td>管理员账号</td>
                                                    <td>2016/9/20 0:00:01</td>
                                                    <td class="change-btn"><span class="success-color">正常</span></td>
                                                    <td>
                                                        <div class="table-btn">
                                                            <a href="javascript:;" class="btn btn-edit" data-toggle="modal" data-target="#generalModal">编辑</a>
                                                            <a href="javascript:;" class="btn btn-enables btn-state" data-state="0">禁用</a>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td><input type="checkbox" class="J_singleInput"></td>
                                                    <td>005</td>
                                                    <td>zhangsna</td>
                                                    <td>张三丰</td>
                                                    <td>13568599258</td>
                                                    <td>人事部</td>
                                                    <td>技术经理</td>
                                                    <td>管理员账号</td>
                                                    <td>2016/9/20 0:00:01</td>
                                                    <td class="change-btn"><span class="success-color">正常</span></td>
                                                    <td>
                                                        <div class="table-btn">
                                                            <a href="javascript:;" class="btn btn-edit" data-toggle="modal" data-target="#generalModal">编辑</a>
                                                            <a href="javascript:;" class="btn btn-enables btn-state" data-state="0">禁用</a>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                    <div class="foot-paging">
                                        <ul class="pagination clearfix">
                                            <li class="paginate_button first" id="">
                                              <a href="#">首页</a>
                                            </li>
                                            <li class="paginate_button previous disabled" id="">
                                              <a href="#">上一页</a>
                                            </li>
                                            <li class="paginate_button active">
                                              <a href="#">1</a>
                                            </li>
                                            <li class="paginate_button">
                                              <a href="#">2</a>
                                            </li>
                                            <li class="paginate_button">
                                              <a href="#">3</a>
                                            </li>
                                            <li class="paginate_button">
                                              <a href="#">4</a>
                                            </li>
                                            <li class="paginate_button">
                                              <a href="#">5</a>
                                            </li>
                                            <li class="paginate_button">
                                              <a href="#">6</a>
                                            </li>
                                            <li class="paginate_button next" id="">
                                              <a href="#">下一页</a>
                                            </li>
                                            <li class="paginate_button last" id="">
                                              <a href="#">尾页</a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <footer class="footer">
          <div class="footer-copyright">
            <div class="container clearfix">
              <div class="foot-logo">
                <img src="../static/assets/images/logo_foot.png" alt="">
              </div>
              <div class="foot-right fr">
                <ul class="copyright-menu clearfix">
                  <li><a href="#">法律声明</a></li>
                  <li>|</li>
                  <li><a href="#">关于北塔</a></li>
                  <li>|</li>
                  <li><a href="#">联系我们</a></li>
                  <li>|</li>
                  <li><a href="#">会员权益介绍</a></li>
                  <li>|</li>
                  <li><a href="#">管理员创建</a></li>
                  <li>|</li>
                  <li><a href="#">返回首页</a></li>
                </ul>
                <div class="copyright-txt">
                  <span>2001-2018 © 上海北塔软件股份有限公司版权所有</span>
                  <span class="ml20">沪ICP备09033812号</span>
                </div>
              </div>
            </div>
          </div>
        </footer>
    </div>
    
    <!-- 带关闭提交按钮的弹窗 -->
    <!-- style里的属性值正式用时要删除 加类名in可显示弹窗 style="display: block; left: 250px; right:auto; top: 330px;"-->
    <div class="modal fade reset-modal-content" id="generalModal" aria-hidden="true" keyboard="false" data-backdrop="static"> 
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close"  data-dismiss="modal" aria-label="Close"><span>×</span></button>
                    <h4 class="modal-title">新增账号</h4>
                </div>
                <div class="modal-body">
                    <ul class="account-dialog clearfix">
                        <li>
                            <label>手机号：</label>
                            <input type="text" class="account-input form-control" placeholder="">
                            <span class="c_red">*</span>
                        </li>
                        <li>
                            <label>真实姓名：</label>
                            <input type="text" class="account-input form-control" placeholder="">
                            <span class="c_red">*</span>
                        </li>
                        <li>
                            <label>账号：</label>
                            <input type="password" class="account-input form-control" placeholder="全公司设置统一命名规范">
                            <span class="c_red">*</span>
                        </li>
                        <li>
                            <label>部门：</label>
                            <input type="text" class="account-input form-control" placeholder="">
                            <span class="c_red">*</span>
                        </li>
                        <li>
                            <label>密码：</label>
                            <input type="password" class="account-input form-control" placeholder="">
                            <span class="c_red">*</span>
                        </li>
                        <li>
                            <label>职务：</label>
                            <input type="text" class="account-input form-control" placeholder="">
                            <span class="c_red">*</span>
                        </li>
                        <li>
                            <label>确认密码：</label>
                            <input type="password" class="account-input form-control" placeholder="">
                            <span class="c_red">*</span>
                        </li>
                        <li>
                            <label>邮箱：</label>
                            <input type="text" class="account-input form-control" placeholder="">
                            <span class="c_red">*</span>
                        </li>
                        <li class="widthauto">
                            <label>性别：</label>
                            <div class="account-gender reset-account-gender">
                                <label><input type="radio" name="radio">男</label>
                                <label><input type="radio" name="radio">女</label>
                            </div>
                            <!-- <span class="c_red">*</span> -->
                        </li>
                        <li class="widthauto">
                            <label>角色：</label>
                            <div class="account-role">
                                <span class="active">工程师</span>
                                <span>积分使用</span>
                                <!-- <span>资金管理账号</span>
                                <span>管理员账号</span> -->
                            </div>
                        </li>
                        <li class="widthauto">
                            <label>积分使用额度：</label>
                            <input type="text" class="account-input form-control" placeholder="">
                            <span class="core-text">额度当月有效，不跨月累计。企业可用积分：2000</span>
                        </li>
                    </ul>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-gray" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-blue" data-dismiss="modal">确认</button>
                </div>
            </div>
        </div>
    </div>
    <!-- <div class="modal-backdrop fade in"></div> <!-- 弹窗后面的遮罩层-->

   <script type="text/javascript" src="../static/assets/js/jquery.js"></script>
   <script type="text/javascript" src="../static/components/bootstrap.min.js"></script>
   <script type="text/javascript" src="../static/components/sweetalert2/sweetalert2.js"></script>
   <script type="text/javascript">
      $(".J_allInput").on("change",function(){
            $(this).closest("thead").siblings('tbody').find(".J_singleInput").prop("checked",$(this).prop("checked"));
      });
      $(".J_singleInput").each(function () {
          $(this).on("change",function () {
              var self = $(this);
              var parent = self.closest(".J_table_data");
              if (parent.find(".J_singleInput:checked").length == parent.find("tbody input[type='checkbox']").length) {
                  parent.find(".J_allInput").prop("checked",true);
              }
              else parent.find(".J_allInput").prop("checked",false);
          }); 
      });

      $(".J_allForbidden").on("click",function(){
            var checklen = $(".J_table_data").find(".J_singleInput:checked").length;
            if (checklen > 0) {
              Swal.fire({
                  text: "您确定要禁用吗？", 
                  type: 'warning',
                  showCancelButton: true,
                  confirmButtonText:"确定",
                  cancelButtonText:"取消",
                  customClass: {
                    confirmButton: 'btn btn-blue',
                    cancelButton: 'btn btn-gray'
                  }
                }).then((isConfirm) => {
                  try {
                      //判断 是否 点击的 确定按钮
                      if (isConfirm.value) {
                        var template = '<span class="success-color">正常</span>'
                        $(".J_table_data").find("input[type='checkbox']:checked").closest('tr').find(".change-btn").html(template);
                        $(".J_table_data").find("input[type='checkbox']:checked").closest('tr').find(".btn-state").attr("data-state","0").html('禁用').addClass('btn-enables').removeClass('btn-edit');
                      }
                  } catch (e) {
                      alert(e);
                  }
                });
                
            }else{
                var template = '<div class="warn-tipbox">未选择记录！</div>';
                var box = $(this).closest("a");
                $(template).appendTo(box);
                setTimeout(function(){
                    $(".warn-tipbox").remove();
                },800);
            }
        });
        $(".J_allEnable").on("click",function(){
            var checklen = $(".J_table_data").find(".J_singleInput:checked").length;
            if (checklen > 0) {
              Swal.fire({
                    text: "您确定要启用吗？",
                    type: 'success',
                    confirmButtonText:"确定",
                    cancelButtonText:"取消",
                    showCancelButton: true,
                    customClass: {
                      confirmButton: 'btn btn-blue',
                      cancelButton: 'btn btn-gray'
                    }
                }).then((isConfirm) => {
                    try {
                        //判断 是否 点击的 确定按钮
                        if (isConfirm.value) {
                              var template = '<span class="danger-color">禁用</span>'
                              $(".J_table_data").find("input[type='checkbox']:checked").closest('tr').find(".change-btn").html(template);
                              $(".J_table_data").find("input[type='checkbox']:checked").closest('tr').find(".btn-state").attr("data-state","1").html('启用').addClass('btn-edit').removeClass('btn-enables');
                        }
                    } catch (e) {
                        alert(e);
                    }
                });
                
            }else{
                var template = '<div class="warn-tipbox">未选择记录！</div>';
                var box = $(this).closest("a");
                $(template).appendTo(box);
                setTimeout(function(){
                    $(".warn-tipbox").remove();
                },800);
            }
        });
        $('.btn-state').on('click',function(){
          var st = $(this).attr('data-state');
          if(st == '1'){
            Swal.fire({
              text: "您确定要启用吗？", 
              type: 'success',
              showCancelButton: true,
              confirmButtonText:"确定",
              cancelButtonText:"取消",
              customClass: {
                confirmButton: 'btn btn-blue',
                cancelButton: 'btn btn-gray'
              }
            }).then((isConfirm) => {
              try {
                  //判断 是否 点击的 确定按钮
                  if (isConfirm.value) {
                        var template = '<span class="success-color">正常</span>'
                        $(this).parents('tr').find(".change-btn").html(template);
                        $(this).attr("data-state","0").html('禁用').addClass('btn-enables').removeClass('btn-edit');
                  }
              } catch (e) {
                  alert(e);
              }
            });

          }else{
            Swal.fire({
                text: "您确定要禁用吗？",
                type: 'warning',
                showCancelButton: true,
                confirmButtonText:"确定",
                cancelButtonText:"取消",
                customClass: {
                  confirmButton: 'btn btn-blue',
                  cancelButton: 'btn btn-gray'
                }
            }).then((isConfirm) => {
                try {
                    //判断 是否 点击的 确定按钮
                    if (isConfirm.value) {
                        var template = '<span class="danger-color">禁用</span>'
                        $(this).parents('tr').find(".change-btn").html(template);
                        $(this).attr("data-state","1").html('启用').addClass('btn-edit').removeClass('btn-enables');
                    }
                } catch (e) {
                    alert(e);
                }
            });

          }
        });

        $('.list-change-status').change(function(){
          var val = $(this).val();
          if(val == '1'){
            $('.J_allEnable').addClass('none');
            $('.J_allForbidden').removeClass('none');
          }else{
            $('.J_allEnable').removeClass('none');
            $('.J_allForbidden').addClass('none');
          }
        });
   </script>
</body>
</html>
